package com.codedancer.campus.client.api.circle;

import com.codedancer.campus.client.service.ICircleLabelService;
import com.codedancer.campus.client.service.vo.circle.CircleLabelVo;
import com.codedancer.campus.common.core.BaseApi;
import com.codedancer.campus.common.response.ApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin(methods = {RequestMethod.GET, RequestMethod.POST, RequestMethod.DELETE,
    RequestMethod.PUT}, maxAge = 3600)
@Api(value = "圈子标签api", description = "圈子标签api", tags = "圈子标签api")
@RequestMapping("/api/circle-label")
public class CircleLabelApi extends BaseApi {

    @Autowired
    private ICircleLabelService circleLabelService;

    @GetMapping("/list/{circleUuid}")
    @ApiOperation("获取圈子标签")
    public ApiResponse<List<CircleLabelVo>> list(
        @PathVariable(value = "circleUuid", required = true) @ApiParam(value = "圈子uuid", required = true) String circleUuid) {
        return success(circleLabelService.list(circleUuid));
    }
}
